package com.itheima.d4_jdk8_time;

import java.time.Duration;
import java.time.LocalDateTime;

public class Test7_Duration {
    public static void main(String[] args) {
        LocalDateTime start = LocalDateTime.of(2023, 1, 1, 12, 0);
        LocalDateTime end = LocalDateTime.of(2023, 1, 1, 13, 0);
        Duration duration = Duration.between(start, end);

        System.out.println(duration.toDays());
        System.out.println(duration.toHours());
        System.out.println(duration.toMinutes());
        System.out.println(duration.toSeconds());
        System.out.println(duration.toMillis());
        System.out.println(duration.toNanos());


    }
}
